.class Lcom/xingbook/huiben/activity/c;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/xingbook/huiben/b/f;


# instance fields
.field final synthetic a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;


# direct methods
.method constructor <init>(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a()Z
    .locals 4

    iget-object v0, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/huiben/view/ViewPagerModify;->getCurrentItem()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-lez v0, :cond_0

    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v1}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v1, v0, v2}, Lcom/xingbook/huiben/view/ViewPagerModify;->a(IZ)V

    :goto_0
    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v1, v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->a(Lcom/xingbook/huiben/activity/HuibenReadingActivity;I)Z

    move-result v0

    return v0

    :cond_0
    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    const-string v2, "\u5df2\u7ecf\u662f\u7b2c\u4e00\u9875\u4e86"

    const/4 v3, 0x0

    invoke-static {v1, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    goto :goto_0
.end method

.method public b()Z
    .locals 5

    const/4 v0, 0x1

    sget-object v2, Lcom/xingbook/huiben/playitem/HuibenPlayService;->o:Lcom/xingbook/huiben/playitem/HuibenPlayService;

    const/4 v1, 0x0

    if-nez v2, :cond_1

    new-instance v1, Landroid/content/Intent;

    const-string v2, "com.111.xingpark.huiben.play.musicservice.action.ACTION_PLAYURL"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v2, "url"

    iget-object v3, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v3}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->d(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/a/a;

    move-result-object v3

    invoke-virtual {v3}, Lcom/xingbook/huiben/a/a;->c()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    :goto_0
    if-eqz v1, :cond_0

    iget-object v2, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-virtual {v2, v1}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    :cond_0
    return v0

    :cond_1
    invoke-virtual {v2}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->h()Lcom/xingbook/huiben/playitem/c;

    move-result-object v2

    sget-object v3, Lcom/xingbook/huiben/playitem/c;->c:Lcom/xingbook/huiben/playitem/c;

    if-eq v2, v3, :cond_2

    new-instance v1, Landroid/content/Intent;

    const-string v2, "com.111.xingpark.huiben.play.musicservice.action.PLAY"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v2, "url"

    iget-object v3, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v3}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->d(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/a/a;

    move-result-object v3

    invoke-virtual {v3}, Lcom/xingbook/huiben/a/a;->c()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    goto :goto_0

    :cond_2
    new-instance v0, Landroid/content/Intent;

    const-string v2, "com.111.xingpark.huiben.play.musicservice.action.PAUSE"

    invoke-direct {v0, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    move v4, v1

    move-object v1, v0

    move v0, v4

    goto :goto_0
.end method

.method public c()Z
    .locals 4

    iget-object v0, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/huiben/view/ViewPagerModify;->getCurrentItem()I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v1}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->e(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    if-ge v0, v1, :cond_0

    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v1}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v1, v0, v2}, Lcom/xingbook/huiben/view/ViewPagerModify;->a(IZ)V

    :goto_0
    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v1, v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->b(Lcom/xingbook/huiben/activity/HuibenReadingActivity;I)Z

    move-result v0

    return v0

    :cond_0
    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    const-string v2, "\u5df2\u7ecf\u662f\u6700\u540e\u4e00\u9875\u4e86"

    const/4 v3, 0x0

    invoke-static {v1, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    goto :goto_0
.end method

.method public d()Z
    .locals 2

    sget-object v0, Lcom/xingbook/huiben/playitem/HuibenPlayService;->o:Lcom/xingbook/huiben/playitem/HuibenPlayService;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/xingbook/huiben/playitem/HuibenPlayService;->h()Lcom/xingbook/huiben/playitem/c;

    move-result-object v0

    sget-object v1, Lcom/xingbook/huiben/playitem/c;->c:Lcom/xingbook/huiben/playitem/c;

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public e()Z
    .locals 2

    iget-object v0, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/huiben/view/ViewPagerModify;->getCurrentItem()I

    move-result v0

    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v1, v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->b(Lcom/xingbook/huiben/activity/HuibenReadingActivity;I)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public f()Z
    .locals 2

    iget-object v0, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->c(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)Lcom/xingbook/huiben/view/ViewPagerModify;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/huiben/view/ViewPagerModify;->getCurrentItem()I

    move-result v0

    iget-object v1, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v1, v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->a(Lcom/xingbook/huiben/activity/HuibenReadingActivity;I)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public g()Z
    .locals 1

    iget-object v0, p0, Lcom/xingbook/huiben/activity/c;->a:Lcom/xingbook/huiben/activity/HuibenReadingActivity;

    invoke-static {v0}, Lcom/xingbook/huiben/activity/HuibenReadingActivity;->f(Lcom/xingbook/huiben/activity/HuibenReadingActivity;)V

    const/4 v0, 0x0

    return v0
.end method
